E.D.I. Import\Export Layout

This appendix contains the following topics:

Introduction to E.D.I Import\Export Layout

E.D.I Fields

 

Introduction to E.D.I Import\Export Layout

Electronic Data Interchange (E.D.I.) is the electronic exchange of business documents using computers. Data is exchanged between trading partners. Using E.D.I. reduces resources required to manually process orders, invoices, etc. by enabling an import feature into the accounting application.

There is more information on the purpose of E.D.I. and the Order Entry E.D.I. interface in the E.D.I. Overview section of the Orders chapter.

The following section contains a list of the fields available for the E.D.I. import layout.

There can be several record types in an E.D.I. import file: Header, Notes, Line and a Comment record. Each type is documented separately below. Here are some line and record import requirements:

The PBS system defaults to DIORDIMP.TXT for the import file name, but you can name the file anything you want as long as the file name is no more than 8 characters plus 3 characters for the extension.
All lines in the import file should be padded with spaces or zeroes as appropriate to the end of the line. Each line should be terminated with a carriage return - line feed (CR/LF) character set.
For one order the sequence of lines in the import file should be Header record, Line record(s), Comment record, and finally Note Record(s). Comments and Notes are optional. Repeat as necessary for additional orders. There can be multiple orders in one import file.
There can be only one Header record and one Comment record to multiple Note and Line records.
An order should consist of at least one Header and one Line.
Comment and Note records are optional.

Some fields are described as This field is not imported or calculated during the import process. These fields are generated when importing; therefore values should not be included in the import file. To account for the length of those fields, blank or zeros should be inserted.

Export Layout

The layout of the export file is essentially the same as the import file layout. However, some fields will exist in the export layout that are not required for the import layout; like the order number and invoice number. Some fields are calculated during the import, but will exist in the export. These are noted in the \E.D.I. field notes below.

PBS v12.06 Layout Change

Due to the expansion of the name field, address fields, purchase order number and invoice number the export and import layouts changed for v12.06 as compared to older versions of PBS.

These changes occur in the expanded bill-to and ship-to name and address fields. The city, state and zip are now three separate fields. There are now new address 3, address 4 and county fields. The purchase order number is now up to 30 characters. The invoice number and credit memo apply-to number are both expanded from 6 to 7 digits.

E.D.I Fields

Many of the fields have specific import formatting requirements and here are some of them:

Numeric format with assumed decimal places. The V character assumes the decimal place. The LIN-QTY-ORD field is designated as 13 bytes with sign trailing separate. The format of the field is 8 integers, 4 decimal, and the sign, for a total of 13 bytes. This is denoted as 99999999V9999+. in the file. The imported field should not contain the V character and will look like the following; 999999999999+.
Date format, CCYYMMDD, where CC = Century, YY = Year, MM = Month, and DD = Day of the month. 20180901 = January 09, 2018.
Time format, HHMMSSTT, where H = Hour, M = Minute, S = Second, and T = Hundredths of a second.
Alphanumeric fields that are not imported should be padded with spaces. Numeric fields that are not imported should be padded with zeroes and a +/- sign if the number is signed.

Header Record

There must be one and only one header record per order. The following table lists the E.D.I. header import fields:

CSV field name

Description

Length

Starting TXT column

Type

Layout

Notes

"HDR-REC-TYP

Record Type

1

1

Alpha

 

Required. The value H denotes Header record.

HDR-ORD-NO 

Order number, this is assigned during import process

6

2

Numeric

999999

This is the order number and is required only if deleting an existing order. Otherwise the program will create the number.

HDR-EDI-DOC-NO

E.D.I. document number

12

8

Alpha

 

Required. This is the EDI document number.

HDR-ORD-TYP

Order type

1

20

Alpha

 

This field must contain either a space or "D". If this has a value of "D" it will delete a previously imported order as long as it has not been processed and it has a matching HDR-ORD-NO (order number).

HDR-ORD-DAT       

Order date

8

20

Numeric

99999999 (CCYYMMDD)

Required

HDR-SLS-MAN-NO

Sales rep code for the order

3

29

Alpha

 

Required. It must match a sales rep that is on file in PBS.

HDR-PO-NO

Customer's purchase order number for this order

30

32

Alpha

 

 

HDR-SHIP-DAT

Order ship date

8

62

Numeric

99999999 (CCYYMMDD)

This date cannot be earlier than the order date.

HDR-CANCEL-DAT

This field is not imported

8

70

Numeric

99999999 (CCYYMMDD)

Use zeros.

HDR-SHIP-VIA-COD

Ship via code

3

78

Alpha

 

Required

HDR-SHIP-VIA-DES

Ship via description

15

81

Alpha

 

Required. It must match the description. of the Ship Via Code description in PBS.

HDR-SHIP-ZONE-COD-COD

Ship zone code

3

96

Alpha

 

 

HDR-SHIP-ZONE-DESC

This field is not imported

25

99

Alpha

 

 

HDR-TERMS-CODE

Customer's order terms code

3

124

Alpha

 

Required

HDR-TAX-COD

Customer's order tax code

3

127

Alpha

 

Required. It must match a tax code in PBS.

HDR-LOC

Warehouse code for the order

2

129

Alpha

 

This field is required if multi-warehouses are used in Inventory Control. Otherwise it can be blank. See the I/C Control information doc.

HDR-PFT-CTR

This field is not imported

8

132

Numeric

99999999

This is defaulted from O/E Control information.

HDR-APPL-TO-NO

This is the apply to invoice number if the order is a credit memo

7

140

Numeric

9999999

This field is required if the order is a credit memo. It must match an invoice in invoice history.

HDR-COMMIS-PCT

This field is not imported

7

141

Numeric

999V999+

This field is populated based on the commission percent on the salesman or customer record.

HDR-FREIGHT-AMT    

This field is not imported

11

154

Numeric

99999999V99+

 

HDR-MISC-AMT 

Imported

11

165

Numeric

99999999V99+

 

HDR-DISC-PCT       

Discount percent

6

176

Numeric

99V999+

 

HDR-DISC-AMT       

This field is not imported

11

182

Numeric

99999999V99+

 

HDR-TAX-AMT        

This field is not imported

11

193

Numeric

99999999V99+

This field is calculated based on the tax code in PBS.

HDR-TOT-QTY-BO

This field is not imported

13

204

Numeric

99999999V9999+

 

HDR-NO-SHIP-LBLS

Number of shipping labels for order

2

217

Numeric

99

 

HDR-NO-COD-LBLS

Number of Cash on Delivery labels for order

2

218

Numeric

99

 

HDR-TOT-WEIGHT

This field is not imported

12

221

Numeric

99999999V999+

This field is calculated based on each item's weight.

 

The next 14 fields contain the customer, number, name and address

 

 

 

 

 

HDR-CUST-NO        

Customer number

12

233

Alpha

 

Required. if the number is numeric it must have leading zeros.

HDR-CUST-NAM 

Customer name

50

245

Alpha

 

Required

HDR-CUST-MID_INIT

Middle initial

1

295

Alpha

 

 

HDR-CUST-SUFFIX

Suffix

20

295

Alpha

 

 

HDR-CUST-NAME-FLAG

Name flag

1

316

Alpha

 

 

HDR-CUST-ADRS-1    

Billing address line one

60

317

Alpha

 

Required

HDR-CUST-ADRS-2    

Billing address line two

60

377

Alpha

 

Required

HDR-CUST-ADRS-3    

Billing address line three

60

437

Alpha

 

 

HDR-CUST-ADRS-4 

Billing address line four

60

497

Alpha

 

 

HDR-CUST-CITY

Billing city

45

557

Alpha

 

Required

HDR-CUST-STATE

Billing state

23

302

Alpha

 

Required

HDR-CUST-ZIP-COD

Billing zip code

15

625

Alpha

 

Required

HDR-CUST-COUNTY

Billing county

45

640

Alpha

 

 

HDR-CUST-COUNTRY

Billing country

3

685

Alpha

 

 

 

This section starts the Ship-to address

 

 

 

 

 

HDR-SHIP-TO-NO

Ship to number set up in PBS

8

772

Alpha

 

If a customer ship to number is not provided for the order it is set to zeros. This means the customer address is used for the shipping address.

HDR-SHIP-TO-NAM    

Ship to Name

50

780

Alpha

 

Required

HDR-SHIP-TO-ADRS-1 

Ship-to address 1

60

852

Alpha

 

Required

HDR-SHIP-TO-ADRS-2 

Ship-to address 2

60

912

Alpha

 

Required

HDR-SHIP-TO-ADRS-3

Ship-to address 3

60

972

Alpha

 

 

HDR-SHIP-TO-ADRS-4

Ship-to address 4

60

1032

Alpha

 

 

HDR-SHIP-TO-CITY

Ship-to city

45

1092

Alpha

 

 

HDR-SHIP-TO-STATE 

Ship-to state

23

1137

Alpha

 

 

HDR-SHIP-TO-ZIP-COD

Ship-to zip code

15

1168

Alpha

 

 

HDR-SHIP-TO-COUNTY

Ship-to county

45

1175

Alpha

 

 

HDR-SHIP-TO-COUNTRY

Ship-to country

3

1220

Alpha

 

 

HDR-SHIP-TO-CONTAC-SEQ-NO

Ship-to contact sequence number

8

1223

Numeric

99999999

This field is not used and is for future development.

HDR-SHIP-TO-CONTAC-LAST-NAME

Ship-to contact last name

35

1231

Alpha

 

This field is not used. it is for future development.

HDR-SHIP-TO-CONTAC-FIRST-NAME

Ship-to contact first name

20

1266

Alpha

 

This field is not used and is for future development.

HDR-SHIP-TO-CONTAC-MID-INIT

Ship-to contact middle initial

1

1286

Alpha

 

This field is not used and is for future development.

HDR-SHIP-TO-CONTAC-SUFFIX

Ship-to contact suffix

20

1287

Alpha

 

This field is not used and is for future development.

HDR-USER-DEF-1

This field is not imported

25

1307

Alpha

 

This field is not used and is for future development.

HDR-USER-DEF-2

This field is not imported

25

1332

Alpha

 

This field is not used and is for future development.

HDR-USER-DEF-3

This field is not imported

25

1357

Alpha

 

This field is not used and is for future development.

HDR-USER-DEF-4

This field is not imported

25

1382

Alpha

 

This field is not used and is for future development.

HDR-USER-DEF-5

This field is not imported

25

1407

Alpha

 

This field is not used and is for future development.

HDR-RESERVED-INFO

This field is not imported

128

1432

Alpha

 

This field is not used and is for future development.

HDR-INVC-INFO

 

 

 

 

 

 

HDR-INVC-METH

This field is not imported

1

1560

Alpha

 

 

HDR-INVC-NO

This field is not imported

7

1561

Numeric

9999999

 

HDR-INVC-DAT

This field is not imported

8

1568

Numeric

99999999 (CCYYMMDD)

 

HDR-SLS-AMT

This field is not imported

12

1576

Numeric

999999999V99+

This field is not imported because the order total is calculated during the import process.

HDR-PMT-RECD

This field is not imported

12

1588

Numeric

999999999V99+

 

HDR-AMT-DUE

This field is not imported

12

1600

Numeric

999999999V99+

 

HDR-TOT-NO-LINS

This field is not imported

6

1612

Numeric

999999

This field is calculated during the import process.

HDR-TOT-QTY

This field is not imported

14

1618

Numeric

99999999V99999+

This field is calculated during the import process.

HDR-TIME-STAMP-DAT

This field is not imported

8

1632

Numeric

99999999 (CCYYMMDD)

 

HDR-TIME-STAMP-TIM

This field is not imported

8

1640

Numeric

99999999

 

Notes Record

There may be multiple notes records per order. Here are the fields:

Field name

Description

Length

Type

Layout

Notes

NOTES-REC-TYP

Note record type

1

Alpha

 

Required. The value N denotes a Comment / Note record.

NOTES-ORD-NO

Order number

6

Numeric

999999

The number is assigned during the import process. Do not import this field.

NOTES-EDI-DOC-NO

EDI document number

12

Alpha

 

Required. This is the EDI Document Order number. It must match the HDR-EDI-DOC-NO field in the header record.

NOTES-NOTES-ID

Comment ID

20

Alpha

 

This field is not used.

NOTES-NOTES-LIN

Comment text

78

Alpha

 

Required

NOTES-TIME-STAMP-DAT

This field is not imported

8

Numeric 99999999 (CCYYMMDD)

 

NOTES-TIME-STAMP-TIM

This field is not imported

8

Numeric 99999999  

Line Record

There may be multiple line records per order. Here are the fields:

Field name

Description

Length

Starting column

Type

Layout

Notes

LIN-REC-TYP

Line Item indicator; see notes column

1

1

Alpha

 

Required. The value L denotes a Line record.

LIN-ORD-NO

Order Number

6

2

Numeric

999999

This is assigned during the import process. Do not import this field.

LIN-EDI-DOC-NO

EDI Document number

12

8

Alpha

 

Required. This is the EDI Document Order number, It should match HDR-EDI-DOC-NO.

LIN-LIN-NO

Line number

5

20

Numeric

99999

This field is not imported. The order line numbers are calculated during the import process.

LIN-ITEM-NO

Item number

15

25

Alpha

 

Required. If numeric you must have leading zeros.

LIN-UPC-CODE

Item UPC code

20

40

Alpha

 

If this field is blank it will be skipped, if this field has a non-space value it will be verified against the I/C Item keyword file.

LIN-DESC-1

Line item description 1

25

60

Alpha

 

If this field is blank it will be defaulted from the item file record.

LIN-DESC-2

Line Item description 2

25

85

Alpha

 

If this field is blank it will be defaulted from the item file record.

LIN-LOC

Warehouse code for the line item

2

110

Alpha

 

This field is required if multiple warehouses are being used in I/C, otherwise leave it blank.

LIN-DROP-SHIP-FLG

Drop ship flag

1

112

Alpha

 

If the item is to be drop shipped to the customer this field should be set to Y.

LIN-SPEC-ORD-FLG

This field is not imported

1

113

Alpha

 

 

LIN-DISC-PCT

Order line discount percent

6

114

Numeric

99V9999

 

LIN-SHIP-DAT

Order line ship date

8

120

Numeric

99999999

(CCYYMMDD)

 

LIN-SLS-MAN-NO

This field is not imported

3

128

Alpha

 

 

LIN-PFT-CTR

This field is not imported

8

131

Numeric

99999999

 

LIN-REF

Line reference

15

139

Alpha

 

 

LIN-ORD-UNIT

Stocking unit of measure

4

154

Alpha

 

This must match the item's stocking unit of measure or one of the alternate units of measure.

LIN-QTY-ORD

Quantity ordered

13

158

Numeric

99999999V9999+

 

LIN-QTY-SHIP

This field is not imported

13

171

Numeric

99999999V9999+

 

LIN-QTY-BO

This field is not imported

13

184

Numeric

99999999V9999+

 

LIN-QTY-RTN

This field is not imported

13

197

Numeric

99999999V9999+

 

LIN-PRC

Line extended amount. This field is not imported

13

210

Numeric

99999999V9999+

This is calculated during import. This is price times quantity

LIN-PRC-1

Line item unit price

13

223

Numeric

99999999V9999+

Required.

LIN-UNIT-COST

This field is not imported

12

236

Numeric

9999999V99999

 

LIN-TIME-STAMP-DAT

This field is not imported

8

248

Numeric

99999999

 

LIN-TIME-STAMP-TIM

This field is not imported

8

256

Numeric

99999999

 

 

Comment Record

There can be one comment per order. Here are the fields:

Field name

Description

Length

Type

Layout

Notes

LIN-REC-TYP

Comment indicator, see notes

1

Alpha

 

Required. The value C denotes a Comment record.

LIN-ORD-NO

Order number, this is assigned during import process

6

Numeric

999999

Zero fill

LIN-EDI-DOC-NO

EDI document number should match HDR-EDI-DOC-NO

12

Alpha

 

Required. This is the EDI Document Order number.

LIN-LIN-NO

This field is not imported

5

Numeric

9999

The order comment line number is defaulted to 9999 with zero fill.

LIN-DATA

Comment data

150

Alpha